package com.icomvn.game.pikachu.utility;

public class Parser {
	public static String getPropertyOnly(String source,String tag,String closeTag){
		return source.split(tag)[1].split(closeTag)[0];
	}
	public static String[] getProperty(String source,String tag,String closeTag){
		String mid[]=source.split(tag);
		String output[]=new String[mid.length-1];
		for(int i=0;i<mid.length-1;i++){
			output[i]=mid[i+1].split(closeTag)[0];
		}
		return output;
	}
	public static int[] getPropertyToInt(String source,String tag,String closeTag){
		String mid[]=source.split(tag);
		int output[]=new int[mid.length-1];
		for(int i=0;i<mid.length-1;i++){
			output[i]=Integer.valueOf(mid[i+1].split(closeTag)[0]);
		}
		return output;
	}

}
